Skip to content

[2.4.x] mod_md: Honour the Retry-After header of ACME responses (BZ 7… - #1159

Open
arturobernalg wants to merge 1 commit into
apache:2.4.xfrom
arturobernalg:backport/70282-retry-after-24x
Open

arturobernalg wants to merge 1 commit into
apache:2.4.xfrom
arturobernalg:backport/70282-retry-after-24x

Conversation

@arturobernalg

@arturobernalg arturobernalg commented Dec 3, 2026 •

Copy link
Copy Markdown
Member

Adds md_util_parse_retry_after() (RFC 9110, 10.2.3) and wires it into authz/order polling and finalize/CSR via the new md_util_try_with_retry_after(). Verified against a real local pebble ACME server: unpatched 2.4.x polls ~101ms after finalize-order, ignoring the hint; this patch waits ~5s, matching pebble's configured order Retry-After.

Also backports the interruptible wait it needs (md_util_interrupt_set()/APR_EINTR), so a long wait doesn't delay a shutdown. On 2.4.x that only kicks in under -X: mod_watchdog.c here doesn't join the watchdog thread on a forked MPM child stop, so a graceful-stop kills the child before EINTR handling runs. Harmless either way, just not effective under a forked MPM.

Not backported: support/a2md and its test, since a2md doesn't exist on 2.4.x. The parser itself has no httpd dependency and is unchanged.

GitHub: closes #868

[Arturo Bernal]


[x] This PR does not report or address a security vulnerability.
[x] Code follows the httpd style guide.
[ ] New log messages (n/a, no new APLOGNO)
[x] changes-entries/md-retry-after.txt included.
[x] pyhttpd tests: existing modules/md/test_900_notify.py::test_md_900_010, verified RED/GREEN against a real pebble server

…0282)

Adds md_util_parse_retry_after() (RFC 9110, 10.2.3) and wires it into
authz/order polling and finalize/CSR via the new
md_util_try_with_retry_after().

Also backports the interruptible wait it needs
(md_util_interrupt_set()/APR_EINTR), so a long wait doesn't delay a
shutdown. On 2.4.x that only kicks in under -X: mod_watchdog.c here
doesn't join the watchdog thread on a forked MPM child stop, so a
graceful-stop kills the child before EINTR handling runs. Harmless
either way, just not effective under a forked MPM.

Not backported: support/a2md and its test, since a2md doesn't exist
on 2.4.x. The parser itself has no httpd dependency and is unchanged.

(cherry picked from commit 1f2936a)

GitHub: closes apache#868

[Arturo Bernal]
@arturobernalg
arturobernalg force-pushed the backport/70282-retry-after-24x branch from 9265c40 to d272ff0 Compare December 3, 2026 18:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant